<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>今年过了几个星期三</title>
	<script>
	var thisYear = new Date('2017-01-01 00:00:00');
	var wed=2;
	var now = new Date();
	var diff=Math.floor((now.getTime()-thisYear.getTime())/(1000*60*60*24));

	if(thisYear.getDay()<=wed){
		var d=wed+1-thisYear.getDay();
	}else{
		var d=wed+8-thisYear.getDay();
	}
	var n=Math.floor((diff-d)/7)+1;
	document.write(n);
	</script>
</head>
<body>
	
</body>
</html>